/**
 * ESS Brand Design System
 * Version: 2.0
 * Last Updated: December 5, 2025
 * 
 * This file contains the unified ESS design system with both
 * Liquid Glass and Neumorphic aesthetic variants.
 * 
 * Usage: <link rel="stylesheet" href="path/to/ess-brand.css">
 */

/* ============================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */

:root {
    /* ---- Core Brand Colors ---- */
    --ess-orange: #F97316;
    --ess-orange-light: #FB923C;
    --ess-orange-glow: rgba(249, 115, 22, 0.3);
    --ess-orange-subtle: rgba(249, 115, 22, 0.15);
    
    --ess-blue: #1E3A8A;
    --ess-blue-light: #3B82F6;
    --ess-blue-glow: rgba(30, 58, 138, 0.3);
    
    /* ---- Status Colors ---- */
    --ess-success: #10B981;
    --ess-success-alt: #22C55E;
    --ess-success-subtle: rgba(16, 185, 129, 0.15);
    
    --ess-warning: #EF4444;
    --ess-warning-dark: #DC2626;
    --ess-warning-subtle: rgba(239, 68, 68, 0.15);
    
    --ess-caution: #EAB308;
    --ess-caution-highlight: #F2C038;
    --ess-caution-subtle: rgba(234, 179, 8, 0.15);
    
    /* ---- Typography ---- */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-accent: 'Space Grotesk', sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', monospace;
    
    /* ---- Spacing Scale (8px base) ---- */
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 80px;
    
    /* ---- Border Radius Scale ---- */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-3xl: 32px;
    --radius-full: 9999px;
    
    /* ---- Liquid Glass Properties (Dark Mode Default) ---- */
    --glass-radius: 24px;
    --glass-radius-lg: 32px;
    --glass-blur: 20px;
    --glass-saturate: 180%;
    
    --bg-primary: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    --bg-secondary: #0f172a;
    --bg-tertiary: #1e293b;
    
    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-hover: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    
    /* ---- Neumorphic Properties ---- */
    --neuro-bg: #E6E9F0;
    --neuro-bg-light: #F8FAFC;
    --neuro-border: #D1D5DB;
    --neuro-track: #E5E7EB;
    
    --neuro-text-primary: #1E293B;
    --neuro-text-secondary: #475569;
    --neuro-text-muted: #9CA3AF;
    
    --neuro-shadow-dark: rgba(174, 174, 192, 0.4);
    --neuro-shadow-light: rgba(255, 255, 255, 0.9);
    --neuro-shadow-inset-dark: rgba(174, 174, 192, 0.3);
    --neuro-shadow-inset-light: rgba(255, 255, 255, 0.7);
    
    /* ---- Animation ---- */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
    --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ---- Light Mode Overrides (Liquid Glass) ---- */
@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f8fafc 100%);
        --bg-secondary: #f1f5f9;
        --bg-tertiary: #e2e8f0;
        
        --text-primary: #1E293B;
        --text-secondary: #475569;
        --text-muted: #94a3b8;
        
        --glass-bg: rgba(255, 255, 255, 0.8);
        --glass-border: rgba(0, 0, 0, 0.08);
        --glass-hover: rgba(255, 255, 255, 0.95);
        --glass-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    }
}


/* ============================================
   2. BASE RESET & TYPOGRAPHY
   ============================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-primary);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-accent);
    font-weight: 700;
    line-height: 1.15;
}

h1 { font-size: clamp(32px, 5vw, 56px); }
h2 { font-size: clamp(28px, 4vw, 42px); }
h3 { font-size: clamp(20px, 3vw, 28px); }
h4 { font-size: clamp(18px, 2.5vw, 24px); }


/* ============================================
   3. LIQUID GLASS COMPONENTS
   ============================================ */

/* ---- Glass Slab Card ---- */
.glass-slab {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    border-radius: var(--glass-radius);
    border: 1px solid var(--glass-border);
    padding: var(--space-xl);
    box-shadow: 
        var(--glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.glass-slab:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 28px 70px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Large glass slab - thicker appearance */
.glass-slab-lg {
    border-radius: var(--glass-radius-lg);
    padding: var(--space-2xl);
    border-width: 2px;
}

/* ---- Glass Button Primary ---- */
.glass-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    background: linear-gradient(135deg, var(--ess-orange), var(--ess-orange-light));
    color: white;
    font-family: var(--font-accent);
    font-size: 18px;
    font-weight: 600;
    padding: 18px 40px;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    text-decoration: none;
    box-shadow: 
        0 4px 20px var(--ess-orange-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.glass-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 30px rgba(249, 115, 22, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.glass-btn-primary:active {
    transform: translateY(0);
}

/* ---- Glass Button Secondary ---- */
.glass-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-accent);
    font-size: 16px;
    font-weight: 600;
    padding: 16px 32px;
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-full);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-base);
}

.glass-btn-secondary:hover {
    border-color: var(--ess-orange);
    color: var(--ess-orange);
}


/* ============================================
   4. NEUMORPHIC COMPONENTS
   ============================================ */

/* ---- Neumorphic Card (Raised) ---- */
.neuro-card {
    background: var(--neuro-bg);
    border-radius: var(--radius-2xl);
    padding: var(--space-xl);
    box-shadow:
        12px 12px 24px var(--neuro-shadow-dark),
        -12px -12px 24px var(--neuro-shadow-light);
    transition: box-shadow var(--transition-base);
}

.neuro-card:hover {
    box-shadow:
        14px 14px 28px rgba(174, 174, 192, 0.5),
        -14px -14px 28px rgba(255, 255, 255, 1);
}

/* ---- Neumorphic Pressed/Embossed ---- */
.neuro-pressed {
    background: var(--neuro-bg);
    border-radius: var(--radius-md);
    box-shadow:
        inset 4px 4px 8px var(--neuro-shadow-inset-dark),
        inset -4px -4px 8px var(--neuro-shadow-inset-light);
}

/* ---- Neumorphic Input ---- */
.neuro-input {
    width: 100%;
    background: var(--neuro-bg);
    border: none;
    border-radius: var(--radius-md);
    padding: 16px 20px;
    font-family: var(--font-primary);
    font-size: 16px;
    color: var(--neuro-text-primary);
    box-shadow:
        inset 4px 4px 8px var(--neuro-shadow-inset-dark),
        inset -4px -4px 8px var(--neuro-shadow-inset-light);
    transition: box-shadow var(--transition-base);
}

.neuro-input:focus {
    outline: none;
    box-shadow:
        inset 4px 4px 8px var(--neuro-shadow-inset-dark),
        inset -4px -4px 8px var(--neuro-shadow-inset-light),
        0 0 0 3px var(--ess-orange-glow);
}

.neuro-input::placeholder {
    color: var(--neuro-text-muted);
}

/* ---- Neumorphic Button (Raised) ---- */
.neuro-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    background: var(--neuro-bg);
    color: var(--neuro-text-primary);
    font-family: var(--font-accent);
    font-size: 16px;
    font-weight: 600;
    padding: 16px 32px;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    box-shadow:
        8px 8px 16px var(--neuro-shadow-dark),
        -8px -8px 16px var(--neuro-shadow-light);
    transition: all var(--transition-base);
}

.neuro-button:hover {
    box-shadow:
        10px 10px 20px rgba(174, 174, 192, 0.5),
        -10px -10px 20px rgba(255, 255, 255, 1);
}

.neuro-button:active,
.neuro-button.selected {
    box-shadow:
        inset 4px 4px 8px var(--neuro-shadow-inset-dark),
        inset -4px -4px 8px var(--neuro-shadow-inset-light);
}

/* ---- Neumorphic CTA (Orange) ---- */
.neuro-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    background: linear-gradient(135deg, var(--ess-orange), var(--ess-orange-light));
    color: white;
    font-family: var(--font-accent);
    font-size: 18px;
    font-weight: 600;
    padding: 18px 40px;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    text-decoration: none;
    box-shadow:
        0 8px 16px var(--ess-orange-glow),
        0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.neuro-cta:hover {
    transform: translateY(-2px);
    box-shadow:
        0 12px 24px rgba(249, 115, 22, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ---- Neumorphic Progress Bar ---- */
.neuro-progress-container {
    background: var(--neuro-bg);
    border-radius: var(--radius-md);
    padding: 4px;
    box-shadow:
        inset 4px 4px 8px var(--neuro-shadow-inset-dark),
        inset -4px -4px 8px var(--neuro-shadow-inset-light);
}

.neuro-progress-fill {
    background: linear-gradient(90deg, var(--ess-blue), var(--ess-blue-light));
    border-radius: var(--radius-sm);
    height: 12px;
    box-shadow: 0 2px 4px var(--ess-blue-glow);
    transition: width 0.3s ease;
}

/* ---- Neumorphic Rating Button ---- */
.neuro-rating-btn {
    background: var(--neuro-bg);
    color: var(--neuro-text-secondary);
    font-family: var(--font-accent);
    font-size: 14px;
    font-weight: 600;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow:
        6px 6px 12px var(--neuro-shadow-dark),
        -6px -6px 12px var(--neuro-shadow-light);
    transition: all var(--transition-base);
}

.neuro-rating-btn:hover {
    box-shadow:
        8px 8px 16px rgba(174, 174, 192, 0.5),
        -8px -8px 16px rgba(255, 255, 255, 1);
}

.neuro-rating-btn.selected {
    background: linear-gradient(135deg, var(--ess-orange), var(--ess-orange-light));
    color: white;
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.15),
        inset -4px -4px 8px rgba(255, 255, 255, 0.2);
}


/* ============================================
   5. SHARED COMPONENTS
   ============================================ */

/* ---- ESS Badge ---- */
.ess-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--ess-orange), var(--ess-orange-light));
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ess-badge-success {
    background: var(--ess-success);
}

.ess-badge-warning {
    background: var(--ess-warning);
}

.ess-badge-info {
    background: var(--ess-blue-light);
}

.ess-badge-outline {
    background: transparent;
    border: 2px solid var(--ess-orange);
    color: var(--ess-orange);
}

/* ---- Text Utilities ---- */
.text-orange { color: var(--ess-orange); }
.text-blue { color: var(--ess-blue-light); }
.text-success { color: var(--ess-success); }
.text-warning { color: var(--ess-warning); }
.text-muted { color: var(--text-muted); }

.text-gradient {
    background: linear-gradient(135deg, var(--ess-orange), var(--ess-orange-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- Section Badge ---- */
.neuro-section-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--ess-orange), var(--ess-orange-light));
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* ============================================
   6. LAYOUT UTILITIES
   ============================================ */

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-sm { max-width: 640px; }
.container-md { max-width: 800px; }
.container-lg { max-width: 1100px; }
.container-xl { max-width: 1280px; }

.section {
    padding: var(--space-4xl) 0;
}

@media (max-width: 768px) {
    .section {
        padding: var(--space-3xl) 0;
    }
}


/* ============================================
   7. ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Animation delays */
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }


/* ============================================
   8. ACCESSIBILITY
   ============================================ */

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus States */
:focus-visible {
    outline: 2px solid var(--ess-orange);
    outline-offset: 2px;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--ess-orange);
    color: white;
    padding: 8px 16px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}


/* ============================================
   9. RESPONSIVE UTILITIES
   ============================================ */

@media (max-width: 768px) {
    .glass-btn-primary,
    .glass-btn-secondary,
    .neuro-cta,
    .neuro-button {
        width: 100%;
        padding: 16px 24px;
    }
    
    .glass-slab,
    .neuro-card {
        padding: var(--space-lg);
    }
}

/* Hide on mobile */
@media (max-width: 640px) {
    .hide-mobile { display: none !important; }
}

/* Hide on desktop */
@media (min-width: 641px) {
    .hide-desktop { display: none !important; }
}










